topic replied by LuckOake in Scripts
Não adianta usar mayNotMove em monstros, não vai funcionar. Use doChangeSpeed(cid, -getCreatureSpeed(cid)). Tá aqui o script: local tempo = 30 -- Tempo em segundos function onStepIn(cid, item, pos) if
topic replied by LuckOake in Scripts
Não adianta usar mayNotMove em monstros, não vai funcionar. Use doChangeSpeed(cid, -getCreatureSpeed(cid)). Tá aqui o script: local tempo = 30 -- Tempo em segundos function onStepIn(cid, item, pos) if
topic replied by LuckOake in Scripts
Realmente esqueci de verificar se é o Account Manager. Obrigado por corrigir. Mas acho melhor colocar a verificação no próprio login.lua: if getCreatureName(cid) == "Account Manager" then registerCrea
topic replied by LuckOake in Scripts
Script (Pasta creaturescripts) accmanagerpos.lua: local pos = {x = 100, y = 60, z = 7} -- Posição function onLogout(cid) doTeleportThing(cid, pos) return true end Login.lua, antes do último return tru
posted a topic in the forum by LuckOake in Archived
Olá galera. Um tempo atrás, para ajudar um amigo, fiz um debugger que permite usar algumas funções de Tibia de maneira mais "real", pois eu estava ensinando Lua para ele, e ele estava com dificuldades
topic replied by LuckOake in Scripts
A função unregisterCreatureEvent só pode ser adicionada nas sources. Tá aqui o código: luascript.cpp: //unregisterCreatureEvent(uid, eventName) lua_register(m_luaState, "unregisterCreatureEvent", LuaI
topic replied by LuckOake in Linguagens de Programação
Nice system. Rep+
topic replied by LuckOake in Mods, funções e outros
Sobre a action, não precisa do callback onUse porque só tem ele nas actions, não há outros. Mas não sei por que deu erro aí, aqui não deu problemas. Sobre o statschange, vi que tem bug mesmo. Vou arru
topic replied by LuckOake in Tutoriais de Spriting
Poxa, brilhante ideia de programa. Deve ter dado um trabalho bom pra fazer, adorei.
topic replied by LuckOake in Scripts
Certo. Dúvida sanada? Se sim, reporte o tópico para ser movido.
topic replied by LuckOake in Scripts
Rapaz, aí eu já não sei. Provavelmente é algum bug do TFS. Vou ver se acho algo aqui.
topic replied by LuckOake in Linguagens de Programação
Maneiro, dá pra fazer muitas coisas com isso. Poderia dar suporte pra trade com NPCs e até monstros (?), tipo parte de quest, ficaria legal.
topic replied by LuckOake in Scripts
Usar condition não resolve, quando o player fizer logout vai sair. O mais certo é usar doPlayerAddMagLevel(cid, amount) ou pela database mesmo, fazendo logout no player e modificando.
topic replied by LuckOake in Scripts
Corrigido: function onStepIn(cid, item, position, fromPosition) local player_item = getPlayerItemById(cid, true, 1678) if player_item.uid > 0 then if getItemAttribute(player_item.uid, "description") t
topic replied by LuckOake in Scripts
Engraçado é que esse script deveria funcionar. Você registrou no actions.xml?
topic replied by LuckOake in Scripts
Tó: function onStepIn(cid, item, position, fromPosition) local player_item = getPlayerItemById(cid, true, 1678) if player_item.uid > 0 and getItemAttribute(player_item.uid, "description") then doPlaye
topic replied by LuckOake in Mods, funções e outros
Explique direito o bug da action, por favor. Corrigi o bug de usar em players.
posted a topic in the forum by LuckOake in Scripts
Olá galera. Tava aqui de boa sem o que fazer, aí tive essa ideia de fazer um tópico pros membros pedirem scripts simples. Regrinhas: NÃO PEÇA EVENTOS AQUI, SÓ SCRIPTS OU SISTEMAS SIMPLES; NÃO PEÇA SCR
posted a topic in the forum by LuckOake in Tutoriais de Scripting
Introdução ao OOP (Object-Oriented Programming) "A orientação a objetos é um paradigma de análise, projeto e programação de sistemas de software baseado na composição e interação entre diversas unidad
posted a topic in the forum by LuckOake in Mods, funções e outros
Olá galera. Devido a um pedido, refiz a função getSearchString das sources do TFS em Lua, e vou aproveitar e postar ela aqui, caso alguém vá a precisar um dia. Explicando os parâmetros da função getSe
posted a topic in the forum by LuckOake in Mods, funções e outros
Vi que muitos voltaram, principalmente meu mestre Oneshot, então voltei também. Não sei se voltei pra ficar ativo, mas de qualquer maneira, vou quebrar o gelo e postar um sistema depois de mais de um